class Animal:
    def shout(self):
        print("动物在叫")


class Dog(Animal):
    def shout(self):
        print("狗子汪汪叫")


class Cat(Animal):
    def shout(self):
        print("野猫喵喵叫")


def fn(o):
    o.shout()


d = Dog()
c = Cat()
fn(d)
fn(c)
